Minesweeper as a Constraint Satisfaction Problem
نویسنده
چکیده
Minesweeper is a simple one−player computer game commonly found on machines with popular operating systems such as Linux or Microsoft Windows. The game consists of a 2 dimensional rectangular playing field (or board) where some known number of mines have been hidden. Initially, all of the squares on the board are "covered up" and no information is given to indicate the location of the mines. The player’s job is to either deduce or guess which board squares are clear of mines and step there to reveal a number. If successful, this number will indicate the number of mines to be found in the squares adjacent to the square with the number. Obviously, the first move of the game must be a guess because no information has been provided. Since the board is a rectangular grid, each interior square has exactly 8 neighbouring squares, edge squares have 5 neighbours, and corner squares have 3 neighbours. Therefore, the number found under any given square will be in the range of 0 to 8 (inclusive). Game play continues until the player has uncovered (or "stepped" on) each and every square that does not hide a mine, while successfully avoiding all of the mines. If the player can do this, they are considered to have won the game. However, if at any point the player attempts to uncover a square that contains a mine, the game immediately ends and the player is said to have lost.
منابع مشابه
Algorithmic Approaches to Playing Minesweeper
This thesis explores the challenges associated with designing a Minesweeper solving algorithm. In particular, it considers how to best start a game, various heuristics for handling guesses, and different strategies for making deterministic deductions. The paper explores the single point approach and the constraint satisfaction problem model for playing Minesweeper. I present two novel implement...
متن کاملAn Interactive Constraint-Based Approach to Minesweeper
We present a Java applet that uses Constraint Processing (CP) to assist a human in playing the popular game Minesweeper. Our goal is to illustrate the power of CP techniques to model and solve combinatorial problems in a context accessible to the general public. Minesweeper is a video game that has been included with Microsoft Windows since 1989. In this game, the player is presented with a gri...
متن کاملMinesweeper, #minesweeper
We address the problem of finding an optimal policy for an agent playing the game of minesweeper. The problem is solved exactly, within the reinforcement learning framework, using a modified value iteration. Although it is a Partially Observable Markov Decision Problem (MDP), we show that, when using an appropriate state space, it can be defined and solved as a fully observable MDP. As has been...
متن کاملMinesweeper on graphs
Minesweeper is a popular single player game. It has been shown that the Minesweeper consistency problem is NPcomplete and the Minesweeper counting problem is #P-complete. We present a polynomial algorithm for solving these problems for minesweeper graphs with bounded treewidth.
متن کاملMastermind is NP-Complete
In this paper we show that the Mastermind Satisfiability Problem (MSP) is NPcomplete. Mastermind is a popular game which can be turned into a logical puzzle called the Mastermind Satisfiability Problem in a similar spirit to the Minesweeper puzzle [5]. By proving that MSP is NP-complete, we reveal its intrinsic computational property that makes it challenging and interesting. This serves as an ...
متن کامل